import { piniaStore } from '../store'
export const useAppStore = defineStore('app', {
  state: () => {
    return {
      darkMode: 'light',
      navHeight: 0,
      selectAddress: {
        // 收货地址/收件地址
        receiveAddress: {},
        // 发货地址/寄件地址
        sendAddress: {}
      },
      chooseAddress: {}
    }
  },
  actions: {},
  persist: true // 配置持久化
})

export function useOutsideAppStore() {
  return useAppStore(piniaStore)
}
